//
//  LSPublicNoticeCell.m
//  LookScore
//
//  Created by wr on 2017/12/8.
//  Copyright © 2017年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSPublicNoticeCell.h"
@interface LSPublicNoticeCell()

@property(strong,nonatomic)UILabel *contentLab;

@end

@implementation LSPublicNoticeCell

+(LSPublicNoticeCell *)PublicNoticeTableViewCellByTableView:(UITableView *)tableView{
    
    LSPublicNoticeCell *cell=[tableView dequeueReusableCellWithIdentifier:NSStringFromClass(self)];
    if (!cell) {
        cell=[[LSPublicNoticeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self)];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
    }
    return cell;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addContentView];
    }
    
    return self;
}

-(void)addContentView{

    UIView *backView=[[UIView alloc]init];
    backView.backgroundColor=LSTitleWhiteColor;
    [self.contentView addSubview:backView];
    backView.sd_layout.leftEqualToView(self.contentView).offset(LSSpaceLeftWidth2).topEqualToView(self.contentView).rightEqualToView(self.contentView).offset(-LSSpaceLeftWidth2).bottomEqualToView(self.contentView);
    

    UILabel *contentLab=[[UILabel alloc]init];
    contentLab.font=LSFontSize13;
    contentLab.textColor=LSTitleGrayColor2;
    contentLab.textAlignment=NSTextAlignmentCenter;
    contentLab.numberOfLines=0;
    [backView addSubview:contentLab];
    self.contentLab=contentLab;
    contentLab.sd_layout.leftEqualToView(backView).offset(LSSpaceLeftWidth1).topEqualToView(backView).offset(LSSpaceLeftWidth1).rightEqualToView(backView).offset(-LSSpaceLeftWidth1);
    
    UIView *lineView=[[UIView alloc]init];
    lineView.backgroundColor=LSLineGrayColor;
    [backView addSubview:lineView];
    lineView.sd_layout.leftEqualToView(backView).topSpaceToView(contentLab, LSSpaceLeftWidth1).rightEqualToView(backView).heightIs(.5f);
    
    
    UIButton *detailBu=[[UIButton alloc]init];
    detailBu.titleLabel.textColor=LSSubColor7ec5fd;;
    detailBu.titleLabel.font=LSFontSize15;
    detailBu.backgroundColor=LSTitleWhiteColor;
    detailBu.contentHorizontalAlignment=UIControlContentHorizontalAlignmentCenter;
    [detailBu addTarget:self action:@selector(checkDetailAction:) forControlEvents:UIControlEventTouchUpInside];
    [backView addSubview:detailBu];

    detailBu.sd_layout.leftEqualToView(backView).topSpaceToView(lineView, 0).rightEqualToView(backView).heightIs(LSButtonHeight);
}
#pragma mark 🔥 事件
-(void)checkDetailAction:(UIButton *)sender
{
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end

@interface LSPublicNoticeEasyCell()

@property(strong,nonatomic)UILabel *contentLab;

@end

@implementation LSPublicNoticeEasyCell


+(LSPublicNoticeEasyCell *)PublicNoticeEasyTableViewCellByTableView:(UITableView *)tableView{
    LSPublicNoticeEasyCell *cell=[tableView dequeueReusableCellWithIdentifier:NSStringFromClass(self)];
    if (!cell) {
        cell=[[LSPublicNoticeEasyCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self)];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
    }
    return cell;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addContentView];
    }
    
    return self;
}

-(void)addContentView{
    
    UIView *backView=[[UIView alloc]init];
    backView.backgroundColor=LSTitleWhiteColor;
    [self.contentView addSubview:backView];
    backView.sd_layout.leftEqualToView(self.contentView).offset(LSSpaceLeftWidth2).topEqualToView(self.contentView).rightEqualToView(self.contentView).offset(-LSSpaceLeftWidth2).bottomEqualToView(self.contentView);
    
    
    UILabel *contentLab=[[UILabel alloc]init];
    contentLab.font=LSFontSize13;
    contentLab.textColor=LSTitleGrayColor2;
    contentLab.textAlignment=NSTextAlignmentCenter;
    contentLab.numberOfLines=0;
    [backView addSubview:contentLab];
    self.contentLab=contentLab;
    contentLab.sd_layout.leftEqualToView(backView).offset(LSSpaceLeftWidth1).topEqualToView(backView).offset(LSSpaceLeftWidth1).rightEqualToView(backView).offset(-LSSpaceLeftWidth1).bottomEqualToView(backView).offset(-LSSpaceLeftWidth1);
    
}
@end
